package top.huxy.boot.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.huxy.boot.model.entity.User;
import top.huxy.boot.util.obj.Result;
import top.huxy.boot.util.obj.ThreadLocalUser;

@RequestMapping("/test")
@RestController
@Slf4j
public class TestController {
    @RequestMapping("/dz")
    public Result dz() {
        User current = ThreadLocalUser.current();
        if (current == null) {
            return Result.clientError("400");
        } else {
            return Result.success("200");
        }
    }
}
